/* 热门实习页样式 */
:root {
    --primary-color: #5b6bea;
    --primary-light: #eef1ff;
    --primary-dark: #4a59d4;
    --secondary-color: #f50057;
    --secondary-light: rgba(245, 0, 87, 0.12);
    --accent-color: #ff6b00;
    --background-color: #f7f9fc;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #f0f0f5;
    --shadow-color: rgba(0, 0, 0, 0.04);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --active-tab-color: var(--primary-color);
    --inactive-tab-color: #607d8b;
    --tab-indicator: var(--primary-color);
    --animation-speed: 0.3s;
    --card-radius: 12px;
    --btn-radius: 8px;
    
    /* iPhone 15适配变量 */
    --iphone15-width: 390px;
    --iphone15-height: 844px;
    --iphone-safe-area-top: 47px;
    --iphone-safe-area-bottom: 34px;
    --content-max-width: 450px;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-bottom: 56px;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.5;
}

.app-container {
    background-color: var(--background-color);
    max-width: var(--content-max-width);
    margin: 0 auto;
    min-height: 100vh;
}

/* 页面头部 */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: var(--card-background);
    box-shadow: 0 2px 8px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.left-section {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.right-section {
    display: flex;
    align-items: center;
}

.avatar-container {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-light);
    box-shadow: 0 2px 6px rgba(63, 81, 181, 0.15);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 主内容区域 */
.internships-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 70px; /* 为底部导航留出空间 */
}

/* 搜索区域 */
.search-area {
    margin-bottom: 18px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--card-background);
    border-radius: 24px;
    padding: 0 15px;
    box-shadow: var(--card-shadow);
    height: 42px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.1);
    border-color: rgba(63, 81, 181, 0.3);
}

.search-icon {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 20px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-color);
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-light);
}

/* 筛选区域 */
.filter-area {
    margin-bottom: 15px;
}

.filter-tabs {
    display: flex;
    margin-bottom: 16px;
    background-color: var(--card-background);
    padding: 2px;
    border-radius: 0;
    position: relative;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tab.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background-color: var(--primary-color);
}

.filter-options {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin-bottom: 16px;
}

.filter-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 12px;
    cursor: pointer;
}

.filter-option:last-child {
    margin-right: 0;
}

.filter-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.filter-option.active .filter-icon {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-label {
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.filter-option.active .filter-label {
    color: var(--primary-color);
}

.sort-options {
    display: flex;
    border-radius: 8px;
    background-color: #f5f5f9;
    overflow: hidden;
    border: none;
    margin-bottom: 15px;
}

.sort-option {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    color: var(--text-secondary);
}

.sort-option.active {
    background-color: var(--primary-color);
    color: white;
}

/* 职位列表 */
.internships-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 2px;
}

.job-card {
    background-color: var(--card-background);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.job-header {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    margin-right: 12px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.job-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.job-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.job-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-salary {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.company-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
}

.company-name::before {
    content: "•";
    margin-right: 4px;
    color: var(--primary-color);
}

.job-middle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.job-tag {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f5f5f9;
    color: var(--text-secondary);
}

.job-tag-blue {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.job-tag-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.job-tag-icon svg {
    width: 14px;
    height: 14px;
}

.job-description {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.job-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 12px;
    min-width: 55px;
    text-align: right;
}

.job-type {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    white-space: nowrap;
}

.job-date {
    font-size: 12px;
    color: var(--text-light);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-top: auto;
}

.job-apply {
    margin-top: 12px;
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    text-align: center;
    display: inline-block;
}

/* 筛选弹窗 */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-background);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    max-width: var(--content-max-width);
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.filter-modal.open {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-modal:hover {
    background-color: var(--background-color);
}

.modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-group {
    margin-bottom: 24px;
}

.group-title {
    font-size: 16px;
    margin: 0 0 16px;
    color: var(--text-color);
    font-weight: 600;
}

.filter-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.filter-option-item {
    display: flex;
    align-items: center;
}

.filter-option-item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
}

.filter-option-item label {
    font-size: 15px;
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    padding: 18px 20px;
    border-top: 1px solid var(--border-color);
    gap: 16px;
}

.reset-btn, .apply-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn {
    background-color: var(--background-color);
    color: var(--text-secondary);
}

.reset-btn:hover {
    background-color: var(--border-color);
}

.apply-btn {
    background-color: var(--primary-color);
    color: white;
}

.apply-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(63, 81, 181, 0.3);
}

/* 底部导航栏 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    height: 56px;
    max-width: var(--content-max-width);
    margin: 0 auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    padding: 8px 0;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-item .material-symbols-rounded {
    font-size: 24px;
    margin-bottom: 3px;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* 下拉刷新 */
.refresh-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin-top: -60px;
    transition: margin-top 0.3s ease;
    color: var(--primary-color);
}

.refresh-indicator.visible {
    margin-top: 0;
}

.refresh-icon {
    font-size: 28px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.refresh-indicator.refreshing .refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.refresh-text {
    font-size: 13px;
    font-weight: 500;
}

/* 无结果和加载中 */
.no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.no-results.visible {
    display: flex;
}

.no-results-image {
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.no-results-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 10px;
}

.no-results-subtext {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.loading-spinner {
    display: none;
    justify-content: center;
    padding: 30px 0;
}

.loading-spinner.visible {
    display: flex;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(63, 81, 181, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s infinite linear;
}

/* 响应式设计 */
@media (max-width: 360px) {
    .filter-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .job-card {
        flex-wrap: wrap;
    }
    
    .job-header {
        margin-right: 10px;
    }
    
    .company-logo {
        width: 48px;
        height: 48px;
    }
    
    .job-apply {
        margin-top: 10px;
        margin-left: auto;
    }
    
    .job-title {
        max-width: 180px;
    }
    
    .job-right {
        min-width: 45px;
    }
}

@media (min-width: 600px) {
    .internships-list {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

/* 暗黑模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #121212;
        --card-background: #1e1e1e;
        --text-color: #e0e0e0;
        --text-secondary: #b0b0b0;
        --text-light: #808080;
        --border-color: #333333;
        --shadow-color: rgba(0, 0, 0, 0.2);
        --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        --primary-light: rgba(63, 81, 181, 0.2);
    }
    
    .search-bar {
        background-color: #282828;
        border-color: #333333;
    }
    
    .search-bar:focus-within {
        border-color: rgba(63, 81, 181, 0.5);
    }
    
    .filter-icon {
        background-color: #282828;
        border-color: #333333;
    }
    
    .sort-options {
        background-color: #282828;
        border-color: #333333;
    }
    
    .sort-option.active {
        background-color: var(--primary-color);
    }
    
    .company-tag {
        background-color: rgba(63, 81, 181, 0.2);
    }
    
    .ripple {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .reset-btn {
        background-color: #282828;
    }
    
    .reset-btn:hover {
        background-color: #333333;
    }
    
    .job-details, .job-date {
        background-color: #262626;
    }
}

/* 适配不同设备尺寸 */
@media (min-width: 768px) {
    .internships-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPhone 15 优化 */
@media only screen 
    and (device-width: 390px) 
    and (device-height: 844px) 
    and (-webkit-device-pixel-ratio: 3) {
    .app-header {
        padding-top: var(--iphone-safe-area-top);
        height: calc(56px + var(--iphone-safe-area-top));
    }
    
    .bottom-nav {
        padding-bottom: var(--iphone-safe-area-bottom);
        height: calc(56px + var(--iphone-safe-area-bottom));
    }
}

/* 涟漪效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(91, 107, 234, 0.12);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
    z-index: 10;
}

@keyframes ripple {
    to {
        transform: scale(1);
        opacity: 0;
    }
} 